@import '../../styles/variables.less';

.login-container {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #040a18, #0a1f36);
  overflow: hidden;
  
  .background-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    
    .grid-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-image: 
        linear-gradient(rgba(0, 150, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 150, 255, 0.03) 1px, transparent 1px);
      background-size: 50px 50px;
      perspective: 1000px;
      transform-style: preserve-3d;
      animation: grid-move 60s linear infinite;
    }
    
    .particles-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      
      .particle {
        position: absolute;
        background-color: rgba(0, 180, 255, 0.6);
        border-radius: 50%;
        box-shadow: 0 0 10px 2px rgba(0, 180, 255, 0.3);
        pointer-events: none;
        animation: float-particle 15s ease-in-out infinite;
      }
    }
    
    .circle-glow {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 800px;
      height: 800px;
      border-radius: 50%;
      background: radial-gradient(
        circle,
        rgba(0, 100, 255, 0.05) 0%,
        rgba(0, 150, 255, 0.02) 30%,
        rgba(0, 150, 255, 0) 70%
      );
      opacity: 0.7;
      pointer-events: none;
      animation: pulse-glow 8s ease-in-out infinite;
    }
  }
  
  .login-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 460px;
    max-width: 100%;
    padding: 0 30px;
    
    .login-header {
      text-align: center;
      margin-bottom: 50px;
      
      .logo-container {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 15px;
        
        .logo-icon {
          width: 50px;
          height: 50px;
          background: linear-gradient(135deg, #0067ff, #00bbff);
          border-radius: 10px;
          position: relative;
          box-shadow: 0 0 20px rgba(0, 170, 255, 0.6);
          
          &::before {
            content: '';
            position: absolute;
            inset: -2px;
            background: linear-gradient(45deg, #00a3ff, transparent, #00c8ff);
            border-radius: 12px;
            z-index: -1;
            animation: border-pulse 3s infinite linear;
          }
          
          &::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 25px;
            height: 25px;
            background: #fff;
            opacity: 0.9;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
          }
        }
        
        .system-name {
          font-size: 28px;
          font-weight: 600;
          margin-left: 12px;
          background: linear-gradient(to right, #fff, #85e5ff);
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          text-shadow: 0 0 5px rgba(0, 180, 255, 0.4);
        }
      }
      
      .system-desc {
        color: #a3daff;
        font-size: 16px;
        opacity: 0.8;
      }
    }
    
    .login-form-container {
      width: 100%;
      background: rgba(10, 25, 47, 0.5);
      backdrop-filter: blur(10px);
      border-radius: 10px;
      padding: 30px;
      position: relative;
      overflow: hidden;
      box-shadow: 0 0 30px rgba(0, 20, 40, 0.5);
      
      &::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 10px;
        padding: 1px;
        background: linear-gradient(45deg, transparent, rgba(0, 180, 255, 0.3), transparent);
        -webkit-mask: 
          linear-gradient(#fff 0 0) content-box, 
          linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
      }
      
      .form-title {
        text-align: center;
        color: #fff;
        font-size: 20px;
        margin-bottom: 30px;
        font-weight: 500;
        letter-spacing: 1px;
      }
      
      .tech-input {
        background: rgba(0, 30, 60, 0.3);
        border: 1px solid rgba(0, 180, 255, 0.2);
        color: #a3daff;
        border-radius: 4px;
        height: 42px;
        transition: all 0.3s;
        
        input {
          color: #a3daff;
          background: transparent;
        }
        
        .ant-input-prefix {
          color: rgba(0, 180, 255, 0.5);
          margin-right: 10px;
        }
        
        &:hover, &.ant-input-focused, &.ant-input-affix-wrapper-focused {
          border-color: rgba(0, 180, 255, 0.5);
          box-shadow: 0 0 8px rgba(0, 180, 255, 0.3);
        }
      }
      
      .captcha-container {
        display: flex;
        
        .captcha-input {
          flex: 1;
          margin-right: 10px;
        }
        
        .captcha-img {
          width: 100px;
          height: 40px;
          background: #071630;
          border-radius: 4px;
          overflow: hidden;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          border: 1px solid rgba(0, 180, 255, 0.2);
          
          img {
            width: 100%;
            height: 100%;
            object-fit: cover;
          }
          
          &:hover {
            border-color: rgba(0, 180, 255, 0.5);
            box-shadow: 0 0 8px rgba(0, 180, 255, 0.3);
          }
        }
      }
      
      .remember-me {
        color: #a3daff;
        
        .ant-checkbox-checked .ant-checkbox-inner {
          background-color: #00a8ff;
          border-color: #00a8ff;
        }
        
        .ant-checkbox-inner {
          border-color: rgba(0, 180, 255, 0.5);
          background-color: rgba(0, 30, 60, 0.3);
        }
      }
      
      .login-form-forgot {
        float: right;
        color: #66cdff;
        
        &:hover {
          color: #00e1ff;
          text-shadow: 0 0 5px rgba(0, 225, 255, 0.5);
        }
      }
      
      .login-form-button {
        width: 100%;
        height: 42px;
        background: linear-gradient(90deg, #0067ff, #00a8ff);
        border: none;
        border-radius: 4px;
        color: white;
        font-size: 16px;
        font-weight: 500;
        letter-spacing: 1px;
        box-shadow: 0 0 15px rgba(0, 140, 255, 0.4);
        transition: all 0.3s;
        
        &:hover {
          background: linear-gradient(90deg, #0078ff, #00c8ff);
          box-shadow: 0 0 20px rgba(0, 180, 255, 0.6);
          transform: translateY(-1px);
        }
        
        &:active {
          transform: translateY(1px);
          box-shadow: 0 0 10px rgba(0, 140, 255, 0.4);
        }
      }
    }
  }
}

@keyframes grid-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

@keyframes float-particle {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  25% {
    transform: translateY(-30px) translateX(30px);
  }
  50% {
    transform: translateY(-60px) translateX(-20px);
  }
  75% {
    transform: translateY(-30px) translateX(-40px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes border-pulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
} 